#ifndef YJWidgetFactory_h
#define YJWidgetFactory_h

#include "YJAlignment.h"
#include "YJBusyIndicator.h"
#include "YJButtonBox.h"
#include "YJComboBox.h"
#include "YJDialog.h"
#include "YJEmpty.h"
#include "YJFrame.h"
#include "YJCheckBoxFrame.h"
#include "YJCheckBox.h"
#include "YJImage.h"
#include "YJInputField.h"
#include "YJIntField.h"
#include "YJLabel.h"
#include "YJLayoutBox.h"
#include "YJLogView.h"
#include "YJMenuButton.h"
#include "YJMultiLineEdit.h"
#include "YJMultiSelectionBox.h"
#include "YJPackageSelector.h"
#include "YJProgressBar.h"
#include "YJPushButton.h"
#include "YJRadioButtonGroup.h"
#include "YJRadioButton.h"
#include "YJReplacePoint.h"
#include "YJRichText.h"
#include "YJSelectionBox.h"
#include "YJSpacing.h"
#include "YJSquash.h"
#include "YJTable.h"
#include "YJTree.h"
#include "YJWidget.h"
#include "YWidgetFactory.h"



//class YJWidgetFactory;
//class YJApplication;

class YJWidgetFactory: public YWidgetFactory{
public:
	virtual YJDialog * createDialog( YDialogType dialogType, 
    	    YDialogColorMode colorMode = YDialogNormalColor );
	
	virtual YJLabel * createLabel( YWidget * parent, 
		const string & text, bool isHeading = false, 
		bool isOutputField = false );
    
	virtual YJTable *createTable( YWidget * parent, 
		YTableHeader * header_disown, 
		bool multiSelection = false  );
	
	virtual YJSpacing *createSpacing( YWidget * parent, 
		YUIDimension dim, bool stretchable = false, 
		YLayoutSize_t size = 0.0 );
    
	virtual YJSquash *createSquash( YWidget * parent, 
		bool horSquash, bool vertSquash );
    
	virtual YJCheckBoxFrame *createCheckBoxFrame	( YWidget * parent, 
		const string & label, bool checked );
	
	virtual YJLayoutBox* createLayoutBox(YWidget*, YUIDimension);
	
	virtual YJButtonBox* createButtonBox(YWidget*);
	virtual YJPushButton* createPushButton(YWidget*, const std::string&);
	virtual YJInputField* createInputField(YWidget*, const std::string&, bool);
	virtual YJCheckBox* createCheckBox(YWidget*, const std::string&, bool);
	virtual YJRadioButton* createRadioButton(YWidget*, const std::string&, bool);
	virtual YJComboBox* createComboBox(YWidget*, const std::string&, bool);
	virtual YJSelectionBox* createSelectionBox(YWidget*, const std::string&);
	virtual YJTree* createTree(YWidget*, const std::string&);
	virtual YJProgressBar* createProgressBar(YWidget*, const std::string&, int);
	virtual YJRichText* createRichText(YWidget*, const std::string&, bool);
	virtual YJBusyIndicator* createBusyIndicator(YWidget* w, const std::string& label, int timeout);
	virtual YJIntField* createIntField(YWidget* w, const std::string& label, int min, int max, int init);
	virtual YJMenuButton* createMenuButton(YWidget*, const std::string&);
	virtual YJMultiLineEdit* createMultiLineEdit(YWidget*, const std::string&);
	virtual YJImage* createImage(YWidget*, const std::string&, bool);
	virtual YJLogView* createLogView(YWidget*, const std::string&, int, int);
	virtual YJMultiSelectionBox* createMultiSelectionBox(YWidget*, const std::string&);
	virtual YJPackageSelector* createPackageSelector(YWidget*, long int);
	virtual YJWidget* createPkgSpecial(YWidget* w, const std::string& label);
	virtual YJEmpty* createEmpty(YWidget*);
	virtual YJAlignment* createAlignment(YWidget*, YAlignmentType, YAlignmentType);
	virtual YJFrame* createFrame(YWidget*, const std::string&);
	virtual YJRadioButtonGroup* createRadioButtonGroup(YWidget*);
	virtual YJReplacePoint* createReplacePoint(YWidget*);

	/**
	 * helper to get classId
	 */
	int getId();

    
protected:
	friend class YJUI;
	YJWidgetFactory(int id);
private:
	int classId;
};
 
    
#endif // YJWidgetFactory_h   
